/**
 * @Author MrsGuo
 * version 1.0
 * @Date 2023-08-08 16:20
 */
package com.cl.erp_2301.Service.impl;

import com.cl.erp_2301.Service.SourcingGoodsService;
import com.cl.erp_2301.dto.MarketDTO;

import com.cl.erp_2301.mapper.SourcingGoodsMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;
@Service
@Transactional(rollbackFor = {Exception.class,RuntimeException.class})
public class SourcingGoodsServiceImpl implements SourcingGoodsService {
    @Resource
    private SourcingGoodsMapper sourcingGoodsMapper;
    @Override
    public  Integer addMarket(List<MarketDTO> marketDTO) {
        Integer i= sourcingGoodsMapper.addMarket(marketDTO);
        for (MarketDTO marketDTO1:marketDTO){
            marketDTO1.setMarketuuid(marketDTO1.getUuid());
        }
        sourcingGoodsMapper.addMarketDetail(marketDTO);
      return i;
    }

    @Override
    public Integer selectStoreId(Integer gooduuid) {
        return sourcingGoodsMapper.selectStoreId(gooduuid);
    }



}
